<!DOCTYPE html>
{% extends "admin/index.html" %}
{% load admin_static static  %}
{% block javascript %}
        <script type="text/javascript">
        $(document).ready(function(){
             $("#export_file_div").click(function(){
                 $('#export_file').click();
            });
             $("#export_file").change(function(e) {
                $("#export_file_div h3")[0].innerHTML=e.currentTarget.value
            });
        });
    </script>
{% endblock %}
{% block data_content %}
<div>
    <div class="site-title">Query File</div>
	<form enctype="multipart/form-data" action="{% url "user-query-file" %}" method="post" >{% csrf_token %}
            <input id="export_file" name="export_file" type="file" style="display: none" placeholder="Select a source file" />
            <div id="export_file_div" class="well text-muted text-center" style="padding-top: 4rem; padding-bottom: 4rem;">
                    <span class="glyphicon glyphicon-arrow-down" style="font-size: 4rem;"></span>
                    <h3>Click here to choose source file!</h3>
                </div>
        <button id='upload_file' type="submit" class="btn btn-primary js-upload-sessions" style="float: right;margin-top: 54px">
        <span class="glyphicon glyphicon-cloud-upload"></span> Query file
        </button>
	</form>
    <div class="modal fade" id="modal-progress" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">提示</h4>
                </div>
                <div class="modal-body">
                    己提交上传文件，正在后台处理，请等待
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}